package com.blue.integration.serve.netpopo;

import com.blue.core.util.DateUtil;
import com.blue.integration.serve.IdentityCard;

/**
 * @author zhengjin
 * @since 1.0 2018年07月05日
 */
public class NetPopoIdCard
{
	private String retain;
	private String name;
	private String sex;
	private String nation;
	private String birth;
	private String address;
	private String number;
	private String portrait;

	public NetPopoIdCard()
	{
	}

	public IdentityCard toIdentityCard()
	{
		IdentityCard card = new IdentityCard();
		card.setNum(number);
		card.setName(name);
		card.setSex(sex);
		card.setNationality(nation);
		card.setAddress(address);
		card.setSide(IdentityCard.Side.FACE);

		if (birth != null && !birth.isEmpty())
			card.setBirthday(DateUtil.parseDate(birth));

		return card;
	}

	public String getRetain()
	{
		return retain;
	}

	public void setRetain(String retain)
	{
		this.retain = retain;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getSex()
	{
		return sex;
	}

	public void setSex(String sex)
	{
		this.sex = sex;
	}

	public String getNation()
	{
		return nation;
	}

	public void setNation(String nation)
	{
		this.nation = nation;
	}

	public String getBirth()
	{
		return birth;
	}

	public void setBirth(String birth)
	{
		this.birth = birth;
	}

	public String getAddress()
	{
		return address;
	}

	public void setAddress(String address)
	{
		this.address = address;
	}

	public String getNumber()
	{
		return number;
	}

	public void setNumber(String number)
	{
		this.number = number;
	}

	public String getPortrait()
	{
		return portrait;
	}

	public void setPortrait(String portrait)
	{
		this.portrait = portrait;
	}
}
